using Godot;
using System;

public partial class NCharacter : CharacterBody2D
{
	public override void _Ready()
	{
		AddToGroup(nameof(NCharacter));
	}

	public override void _Process(double delta)
	{
		if (Input.IsKeyPressed(Key.Left) || Input.IsKeyPressed(Key.A))
		{
			Velocity = Vector2.Left * 200;
			MoveAndSlide();
		}
		if (Input.IsKeyPressed(Key.Right) || Input.IsKeyPressed(Key.D))
		{
			Velocity = Vector2.Right * 200;
			MoveAndSlide();
		}
		if (Input.IsKeyPressed(Key.Up) || Input.IsKeyPressed(Key.W))
		{
			Velocity = Vector2.Up * 200;
			MoveAndSlide();
		}
		if (Input.IsKeyPressed(Key.Down) || Input.IsKeyPressed(Key.S))
		{
			Velocity = Vector2.Down * 200;
			MoveAndSlide();
		}
	}
}
